#pragma once

#include "Syntax/Kind.hpp"
#include "Syntax/Token.hpp"

#include "Syntax/Statement/Statement.hpp"
#include "Syntax/Statement/ElseClause.hpp"
#include "Syntax/Expression/Expression.hpp"

class IfStatementSyntax : public StatementSyntax
{
public:
    SharedToken IfKeyWord;
    SharedExpression Condition;
    SharedStatement ThanStatement;
    SharedElseClause ElseClause;

public:
    IfStatementSyntax(SharedToken ifKeyword, SharedExpression condition, SharedStatement thenStatement, SharedElseClause elseClause)
        : StatementSyntax(SyntaxKind::IfStatement, "IfStatement"),
          IfKeyWord(ifKeyword), Condition(condition), ThanStatement(thenStatement), ElseClause(elseClause) {}
    ~IfStatementSyntax() = default;
};
// 定义类型;
typedef std::shared_ptr<IfStatementSyntax> SharedIfStatement;